__author__ = 'a.oreshko'
from pages.page import Page
from selenium.webdriver.common.by import By

class FilmEditPage(Page):

    @property
    def save_button(self):
        return self.driver.find_element_by_id("submit")

    @property
    def imdb_number_field(self):
        return self.driver.find_element_by_name("imdbid")

    @property
    def title_field(self):
        return self.driver.find_element_by_name("name")

    @property
    def year_field(self):
        return self.driver.find_element_by_name("year")

    @property
    def is_this_page(self):
        return self.is_element_visible((By.ID,"submit"))